package com.yuyue.dronesystem.entities;

import java.util.Objects;

/**
 * Drone
 */
public class Drone extends Box {

    private Double load;
    private Double speed;
    private Double time;
    private Boolean isVideo;
    private Boolean isPackage;


    public Drone() {
    }

    public Drone(Double load, Double speed, Double time, Boolean isVideo, Boolean isPackage) {
        this.load = load;
        this.speed = speed;
        this.time = time;
        this.isVideo = isVideo;
        this.isPackage = isPackage;
    }

    public Double getLoad() {
        return this.load;
    }

    public void setLoad(Double load) {
        this.load = load;
    }

    public Double getSpeed() {
        return this.speed;
    }

    public void setSpeed(Double speed) {
        this.speed = speed;
    }

    public Double getTime() {
        return this.time;
    }

    public void setTime(Double time) {
        this.time = time;
    }

    public Boolean isIsVideo() {
        return this.isVideo;
    }

    public Boolean getIsVideo() {
        return this.isVideo;
    }

    public void setIsVideo(Boolean isVideo) {
        this.isVideo = isVideo;
    }

    public Boolean isIsPackage() {
        return this.isPackage;
    }

    public Boolean getIsPackage() {
        return this.isPackage;
    }

    public void setIsPackage(Boolean isPackage) {
        this.isPackage = isPackage;
    }

    public Drone load(Double load) {
        this.load = load;
        return this;
    }

    public Drone speed(Double speed) {
        this.speed = speed;
        return this;
    }

    public Drone time(Double time) {
        this.time = time;
        return this;
    }

    public Drone isVideo(Boolean isVideo) {
        this.isVideo = isVideo;
        return this;
    }

    public Drone isPackage(Boolean isPackage) {
        this.isPackage = isPackage;
        return this;
    }

    @Override
    public boolean equals(Object o) {
        if (o == this)
            return true;
        if (!(o instanceof Drone)) {
            return false;
        }
        Drone drone = (Drone) o;
        return Objects.equals(load, drone.load) && Objects.equals(speed, drone.speed) && Objects.equals(time, drone.time) && Objects.equals(isVideo, drone.isVideo) && Objects.equals(isPackage, drone.isPackage);
    }

    @Override
    public int hashCode() {
        return Objects.hash(load, speed, time, isVideo, isPackage);
    }

    @Override
    public String toString() {
        return "{" +
            " load='" + getLoad() + "'" +
            ", speed='" + getSpeed() + "'" +
            ", time='" + getTime() + "'" +
            ", isVideo='" + isIsVideo() + "'" +
            ", isPackage='" + isIsPackage() + "'" +
            "}";
    }
}